import regeneratorRuntime from '../../plugins/regenerator-runtime.js'
import { addVisitorFrequency } from '../../utils/encapsulation.js'//数据监控
import { Request_API_CN, Request_API_COM } from '../../utils/index.js'//封装请求
import login from '../../api/login.js';
import { prefix, surface } from '../../api/config.js';
const app = getApp();
let _this
Page({
  data: {
    orderData:[]
  },
  onLoad: function () {
    _this = this;
    _this.orderData()
  },
  orderData:()=>{//订单数据
    // Request_API_CN('/lipstick/lipstick_record', 'POST', { openid: 'oSEgN5LMofeDnAUEdGBTIFJI0UBY' })
    Request_API_CN(prefix+'/lipstick_record', 'POST', { openid: app.globalData.openid })
    .then((res)=>{
      console.log(res.data.data)
      _this.setData({
        orderData:res.data.data
      })
    })
  },
  copy:(e)=>{//复制
    wx.setClipboardData({
      data: e.currentTarget.dataset.text,
      success:()=>{
        wx.showToast({
          title:'复制成功',
          icon:'none'
        })
      }
    })
  }
})